<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Priithon.plt.plot_utility.property_object</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="Priithon-module.html">Package&nbsp;Priithon</a> ::
        <a href="Priithon.plt-module.html">Package&nbsp;plt</a> ::
        <a href="Priithon.plt.plot_utility-module.html">Module&nbsp;plot_utility</a> ::
        Class&nbsp;property_object
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="Priithon.plt.plot_utility.property_object-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class property_object</h1><p class="nomargin-top"><span class="codelink"><a href="Priithon.plt.plot_utility-pysrc.html#property_object">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_priithon_35" name="uml_class_diagram_for_priithon_35">
<area shape="rect" id="node1" href="Priithon.plt.plot_objects.poly_points-class.html" title="Priithon.plt.plot_objects.poly_points" alt="" coords="257,121,433,159"/>
<area shape="rect" id="node7" href="Priithon.plt.plot_objects.poly_marker-class.html" title="adding a layout method that did most of the computation and marker function selection upfront might speed up drawing" alt="" coords="5,179,187,218"/>
<area shape="rect" id="node12" href="Priithon.plt.plot_objects.poly_line-class.html" title="Priithon.plt.plot_objects.poly_line" alt="" coords="216,179,376,218"/>
<area shape="rect" id="node13" href="Priithon.plt.plot_objects.line_object-class.html" title="Combines poly_line and poly_marker into a single class" alt="" coords="405,179,579,218"/>
<area shape="rect" id="node2" href="Priithon.plt.plot_objects.axis_object-class.html" title="Class for drawing an axis on a graph." alt="" coords="561,121,737,159"/>
<area shape="rect" id="node9" href="Priithon.plt.plot_objects.axis_window-class.html" title="Window is currently size=0,0 window for event handling." alt="" coords="608,179,792,218"/>
<area shape="rect" id="node3" href="Priithon.plt.plot_objects.text_window-class.html" title="Window is currently size=0,0 window for event handling." alt="" coords="1585,179,1769,218"/>
<area shape="rect" id="node4" href="Priithon.plt.wxplt.plot_canvas-class.html" title="Priithon.plt.wxplt.plot_canvas" alt="" coords="767,121,908,159"/>
<area shape="rect" id="node5" href="Priithon.plt.plot_objects.image_object-class.html" title="Priithon.plt.plot_objects.image_object" alt="" coords="937,121,1124,159"/>
<area shape="rect" id="node134" href="Priithon.plt.plot_utility.property_object-class.html#__init__" title="Priithon.plt.plot_utility.property_object.__init__" alt="" coords="947,39,1115,57"/>
<area shape="rect" id="node134" href="Priithon.plt.plot_utility.property_object-class.html#clone_properties" title="Reset the objects attributes to their default values." alt="" coords="947,57,1115,76"/>
<area shape="rect" id="node134" href="Priithon.plt.plot_utility.property_object-class.html#reset_default" title="Reset the objects attributes to their default values." alt="" coords="947,76,1115,95"/>
<area shape="rect" id="node6" href="Priithon.plt.plot_utility.property_object-class.html" title="Base class for graph object with properties like &#39;color&#39;, &#39;font&#39;, etc." alt="" coords="935,6,1127,101"/>
<area shape="rect" id="node8" href="Priithon.plt.plot_objects.border_object-class.html" title="Priithon.plt.plot_objects.border_object" alt="" coords="1153,121,1343,159"/>
<area shape="rect" id="node10" href="Priithon.plt.plot_objects.legend_object-class.html" title="Draws a legend to the lines plotted on the graph." alt="" coords="1372,121,1561,159"/>
<area shape="rect" id="node11" href="Priithon.plt.plot_objects.text_object-class.html" title="Text objects can be placed anywhere in the plot window." alt="" coords="1591,121,1764,159"/>
</map>
  <img src="uml_class_diagram_for_priithon_35.gif" alt='' usemap="#uml_class_diagram_for_priithon_35" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">
Base class for graph object with properties like 'color', 'font', etc.

Many object have a standard set of properties that describe the
object.  Text objects, for example, have a color, font, and style.
These attirbutes often have default values and perhaps only a range
of acceptable values.  Every class derived from this one must have
the variable &quot;_attributes&quot; defined at the class level.  The keys of
this dictionary are the names of the class attributes.  The value
for each key is a list with three entries.  The first is the default
value for the attribute, the second is a list of acceptable values
and the third is a short text description of the attribute.  FOr
example:
  class text_object(property_class):
    _attributes = { 'color': ['black',['black','red','blue'],
                              &quot;The color of the text&quot; ],
                    'style': ['normal',['normal','bold'],
                              &quot;The style of the text&quot; ],}

Currently only the first entry is used.  The second is rather limited
in functionality, but might be useful for automatically generating
dialog boxes.

Graphite has a more flexible property system, but it is somewhat
complex.  Zope also has a nice property structure.  If we run into
major limitations with this 15 line implementation, we might look
here for inspiration (or adoption...).

There is no type safety enforced here which could cause so problems
for unsuspecting users.  Maybe the optional typing of future Python
versions will mitigate this.

</pre>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__init__"></a><span class="summary-sig-name">__init__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">kw</span>,
        <span class="summary-sig-arg">**attr</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.plt.plot_utility-pysrc.html#property_object.__init__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="clone_properties"></a><span class="summary-sig-name">clone_properties</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">other</span>)</span><br />
      Reset the objects attributes to their default values.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.plt.plot_utility-pysrc.html#property_object.clone_properties">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="reset_default"></a><span class="summary-sig-name">reset_default</span>(<span class="summary-sig-arg">self</span>)</span><br />
      Reset the objects attributes to their default values.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.plt.plot_utility-pysrc.html#property_object.reset_default">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Nov 22 14:59:38 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
